#ifndef MY_LISTVIEWITEM_H
#define MY_LISTVIEWITEM_H

#include <qlistview.h>

class MyListView;

class MyListViewItem
	: public QListViewItem
{
	MyListView * myListView;

public:
	MyListViewItem(QListView * parent);
	~MyListViewItem();

	void paintCell(QPainter * p, const QColorGroup & cg, int column, int width, int alignment);
	void paintFocus(QPainter *, const QColorGroup &, const QRect &);
	void paintBranches(QPainter *, const QColorGroup &, int, int, int);

	void setup();

	void setHeight(int);

	bool m_bAvailable;
	bool m_bHavePhone;
	QString m_sStatus;

	const static int c_nMargin = 2;
	const static int c_nSpacing = 1;
	const static int c_nSps = 1; //side pixmap spacing


protected:
	void setSelected(bool s);
	int compare(QListViewItem * i, int col, bool ascending) const;

};


#endif // MY_LISTVIEWITEM_H
